package com.jaks.xpense;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

import com.jaks.xpense.utils.Globals;

public class AboutDialog extends Dialog {

	private Context context = null;

	public AboutDialog(Context context) {
		super(context);
		this.context = context;
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.about);

		TextView productInfo = (TextView) findViewById(R.id.productInfo);
		productInfo.setText(Html.fromHtml(Globals.readTextFile(context, R.raw.product)));

		TextView legalInfo = (TextView) findViewById(R.id.legalInfo);
		legalInfo.setText(Globals.readTextFile(context, R.raw.legal));
	}
}
